<?php
/*
  Column   |           Type           |                         Modifiers
-----------+--------------------------+-----------------------------------------------------------
 htid      | integer                  | not null default nextval('hidedtrace_tlid_seq'::regclass)
 lati      | double precision         |
 longi     | double precision         |
 elevation | double precision         |
 gid       | integer                  |
 address   | character varying(255)   |
 uid       | integer                  |
 orders    | integer                  |
 rdate     | timestamp with time zone |
 mdate     | timestamp with time zone |
 fdate     | timestamp with time zone |
 title     | character varying(255)   |
 tid       | integer                  |
Indexes:

*/

include "config.php";
$objDB = new pgsql();

$uid = $_REQUEST['uid'];

$SQL = "SELECT htid, lati, longi, elevation, gid, address, uid, orders, rdate, mdate, fdate, title, tid FROM hidedtrace WHERE uid = ".$uid." order by rdate desc";

$objDB->query($SQL);

$res = $objDB->fetchJson();
if($res) {
	print_r($res);
	exit;
} else {
	echo "{\"error\" : 0}";
}
?>
